<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/27 0027
 * Time: 16:42
 */

namespace app\api\controller\v1;

use app\api\model\Theme as ThemeModel;
use app\common\lib\exception\ApiException;
use app\api\model\Category as CategoryModel;

class Category
{
    public function getAllCategory()
    {
        $result = CategoryModel::all([], 'img');
        if ($result) {
            return show(200, '', $result);
        }else{
            throw new ApiException('数据不存在', '500', '401');
        }
    }




}